package cn.iocoder.yudao.module.bpm.controller.admin.tohandle.task.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 审批流待办中心——任务 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class BpmHandleTaskBaseVO {

    @Schema(description = "bpm_handle_flow表的自增id", requiredMode = Schema.RequiredMode.REQUIRED, example = "11957")
    @NotNull(message = "bpm_handle_flow表的自增id不能为空")
    private Long bpmHandleFlowId;

    @Schema(description = "外部任务id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3238")
    @NotNull(message = "外部任务id不能为空")
    private Long extTaskId;

    @Schema(description = "任务类型", example = "1")
    private Integer taskType;

    @Schema(description = "处理人帐号", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @NotNull(message = "处理人帐号不能为空")
    private String handleUsername;

    @Schema(description = "处理人姓名", example = "芋艿")
    private String handleName;

    @Schema(description = "来源系统", example = "29817")
    private Integer sourceSystemId;

    @Schema(description = "目标链接", example = "https://www.iocoder.cn")
    private String sourceUrl;

    @Schema(description = "任务处理状态")
    private Integer taskStatus;

    @Schema(description = "处理时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime handleTime;

    @Schema(description = "备注", example = "随便")
    private String remark;

    @Schema(description = "1 删除；0 有效", example = "false")
    private Boolean deleted;

}
